﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace POVRay {
    public class ObjectPigment : Pigment {
        public Object Object { get; set; }
        public Pigment Outside { get; set; }
        public Pigment Inside { get; set; }

        //TODO: tubulence http://www.povray.org/documentation/view/3.7.0/386/

        public ObjectPigment(Object obj, Pigment outside, Pigment inside) {
            Object = obj;
            Outside = outside;
            Inside = inside;
        }

        public override string ToString(int level) {
            StringBuilder sb = new StringBuilder();

            sb.Append("pigment { ");
            sb.Append(Scene.Indentation(level + 1) + "object { ");

            sb.Append(Scene.Indentation(level + 2) + Object.ToString(level + 2) + " ");
            sb.Append(Scene.Indentation(level + 2) + Outside.ToString(level + 2) + ", ");
            sb.Append(Scene.Indentation(level + 2) + Inside.ToString(level + 2) + " ");

            sb.Append(Scene.Indentation(level + 1) + "} ");
            sb.Append(GeneralParameters(level + 1));
            sb.Append(Scene.Indentation(level) + "}");

            return sb.ToString();
        }
    }
}
